﻿@inherits ActionsBlock

@this.CreateForm()

@if (Model.MasterModel.CurrentAction.StartsWith(Str.Business.Services.SelectRole))
{
    @RenderControl("Services/Membership/SelectRole.cshtml")
}
@if (Model.MasterModel.CurrentAction.StartsWith(Str.Business.Services.Register))
{
    @RenderControl("Services/Membership/Register.cshtml")
}
@if (Model.MasterModel.CurrentAction.StartsWith(Str.Business.Services.Change))
{
    @RenderControl("Services/Membership/Change.cshtml")
}
@if (Model.MasterModel.CurrentAction.StartsWith(Str.Business.Services.Logon))
{
    @RenderControl("Services/Membership/Logon.cshtml")
}
@AddControls(!SecurityManager.Identity.IsAuthenticated || !SecurityManager.IsAuthenticationModeForms
? null
: new Fieldset("w51p mh30", "SignOut")
{
    new DefinitionList
    {
        new DefinitionListItem(Str.Business.Services.Logoff)
        {
            new Anchor()
                .SetHref(Url.Action(Str.Business.Services.Logoff))
                .SetTitle(Str.Business.Services.Logoff)
                .AddControls(new Literal(Str.Business.Services.Logoff, true)),
        }
    }
})

@this.CloseForm()